﻿<phone:PhoneApplicationPage
    x:Class="Animation.UsingBlend1Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="myStoryboard" AutoReverse="True" RepeatBehavior="Forever">
			<DoubleAnimation Duration="0:0:1" To="380" Storyboard.TargetProperty="(Canvas.Left)" Storyboard.TargetName="myRec" d:IsOptimized="True">
				<DoubleAnimation.EasingFunction>
					<ExponentialEase EasingMode="EaseOut"/>
				</DoubleAnimation.EasingFunction>
			</DoubleAnimation>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Canvas.Top)" Storyboard.TargetName="myRec">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<BounceEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="670">
					<EasingDoubleKeyFrame.EasingFunction>
						<BounceEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="myRec">
				<EasingColorKeyFrame KeyTime="0:0:1" Value="Red"/>
				<EasingColorKeyFrame KeyTime="0:0:2" Value="#FFF3FF00"/>
			</ColorAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)" Storyboard.TargetName="myRec">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="360"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>
	<Canvas x:Name="myCanvas" Background="Lime">
		<Rectangle x:Name="myRec" Fill="#FFF3FF00" Height="100" Stroke="Black" Width="100" RenderTransformOrigin="0.5,0.5">
			<Rectangle.RenderTransform>
				<CompositeTransform/>
			</Rectangle.RenderTransform>
		</Rectangle>
	</Canvas>

    <!--LayoutRoot is the root grid where all page content is placed-->

</phone:PhoneApplicationPage>